package com.wande.dataplatform.common.constant;

/**
 * 数据中台常量
 *
 * @author ruoyi
 */
public class DataPlatformConstants {

    /**
     * 数据源类型
     */
    public static class DataSourceType {
        public static final String MYSQL = "MYSQL";
        public static final String ORACLE = "ORACLE";
        public static final String POSTGRESQL = "POSTGRESQL";
        public static final String SQLSERVER = "SQLSERVER";
        public static final String DAMENG = "DAMENG";
        public static final String KINGBASE = "KINGBASE";
        public static final String DORIS = "DORIS";
        public static final String KAFKA = "KAFKA";
        public static final String RABBITMQ = "RABBITMQ";
    }

    /**
     * 数据模型表类型
     */
    public static class TableType {
        public static final String DUPLICATE = "DUPLICATE";
        public static final String AGGREGATE = "AGGREGATE";
        public static final String UNIQUE = "UNIQUE";
    }

    /**
     * ETL 任务类型
     */
    public static class EtlTaskType {
        public static final String FULL = "FULL";
        public static final String INCREMENTAL = "INCREMENTAL";
    }

    /**
     * ETL 节点类型
     */
    public static class EtlNodeType {
        public static final String INPUT = "INPUT";
        public static final String TRANSFORM = "TRANSFORM";
        public static final String OUTPUT = "OUTPUT";
    }

    /**
     * 数据质量维度
     */
    public static class QualityDimension {
        public static final String COMPLETENESS = "COMPLETENESS";
        public static final String UNIQUENESS = "UNIQUENESS";
        public static final String VALIDITY = "VALIDITY";
        public static final String CONSISTENCY = "CONSISTENCY";
        public static final String TIMELINESS = "TIMELINESS";
        public static final String ACCURACY = "ACCURACY";
    }

    /**
     * 数据服务 API 状态
     */
    public static class ApiStatus {
        public static final String DRAFT = "DRAFT";
        public static final String PUBLISHED = "PUBLISHED";
        public static final String OFFLINE = "OFFLINE";
    }

    /**
     * 数据服务鉴权类型
     */
    public static class AuthType {
        public static final String TOKEN = "TOKEN";
        public static final String API_KEY = "API_KEY";
        public static final String OAUTH = "OAUTH";
    }

    /**
     * 任务状态
     */
    public static class TaskStatus {
        public static final String PENDING = "PENDING";
        public static final String RUNNING = "RUNNING";
        public static final String SUCCESS = "SUCCESS";
        public static final String FAILED = "FAILED";
        public static final String STOPPED = "STOPPED";
    }

    /**
     * 调度类型
     */
    public static class ScheduleType {
        public static final String CRON = "CRON";
        public static final String DEPENDENCY = "DEPENDENCY";
        public static final String MANUAL = "MANUAL";
    }

    /**
     * 数据资产状态
     */
    public static class AssetStatus {
        public static final String DRAFT = "DRAFT";
        public static final String PUBLISHED = "PUBLISHED";
        public static final String ARCHIVED = "ARCHIVED";
        public static final String DESTROYED = "DESTROYED";
    }

    /**
     * 数据资产分级
     */
    public static class AssetLevel {
        public static final String PUBLIC = "PUBLIC";
        public static final String INTERNAL = "INTERNAL";
        public static final String CONFIDENTIAL = "CONFIDENTIAL";
        public static final String SECRET = "SECRET";
    }

    /**
     * 血缘关系类型
     */
    public static class LineageType {
        public static final String ETL = "ETL";
        public static final String SQL = "SQL";
        public static final String API = "API";
    }

    /**
     * 缓存键前缀
     */
    public static class CachePrefix {
        public static final String DATASOURCE = "dataplatform:datasource:";
        public static final String METADATA = "dataplatform:metadata:";
        public static final String API_RESULT = "dataplatform:api:result:";
        public static final String QUERY_RESULT = "dataplatform:query:result:";
    }

    /**
     * 默认值
     */
    public static class Default {
        public static final int PAGE_SIZE = 1000;
        public static final int QUERY_TIMEOUT = 60;
        public static final int API_RATE_LIMIT = 100;
        public static final int CACHE_EXPIRE_SECONDS = 300;
    }

}
